<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>mbed-lib: mbed_can.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">mbed-lib
   &#160;<span id="projectnumber">1.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">mbed_can.h</div>  </div>
</div>
<div class="contents">
<a href="mbed__can_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright (c) Ludo Visser</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of the mbed-lib project, and is distributed under the</span>
<a name="l00004"></a>00004 <span class="comment"> * terms of the MIT License. The full license agreement text can be found</span>
<a name="l00005"></a>00005 <span class="comment"> * in the LICENSE file.</span>
<a name="l00006"></a>00006 <span class="comment"> */</span>
<a name="l00007"></a>00007 
<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;LPC17xx.h&quot;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;lpc17xx_can.h&quot;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;lpc17xx_pinsel.h&quot;</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef MBED_CAN_H</span>
<a name="l00021"></a><a class="code" href="mbed__can_8h.html#a94977ca6ec91be83fdae5ac937deb7f9">00021</a> <span class="preprocessor"></span><span class="preprocessor">#define MBED_CAN_H      </span>
<a name="l00027"></a><a class="code" href="group__cobs.html#ga3bca07b8ad662cd504df4c0de41769b7">00027</a> <span class="preprocessor">#define CAN_COB_NMT             (0 &lt;&lt; 7)        </span>
<a name="l00028"></a><a class="code" href="group__cobs.html#gaf88f80f96debacbac8228802dd75a159">00028</a> <span class="preprocessor">#define CAN_COB_SYNC            (1 &lt;&lt; 7)        </span>
<a name="l00029"></a><a class="code" href="group__cobs.html#ga6c19300ecc0f29de9de498741a324b2e">00029</a> <span class="preprocessor">#define CAN_COB_TIME            (2 &lt;&lt; 7)        </span>
<a name="l00030"></a><a class="code" href="group__cobs.html#gaee2df258fc5a83f1c46031bad505f4b4">00030</a> <span class="preprocessor">#define CAN_COB_EMCY            (1 &lt;&lt; 7)        </span>
<a name="l00031"></a><a class="code" href="group__cobs.html#gae53e0c16a4d2e838f33ac93750cfe16f">00031</a> <span class="preprocessor">#define CAN_COB_TPDO1           (3 &lt;&lt; 7)        </span>
<a name="l00032"></a><a class="code" href="group__cobs.html#ga71d1ead567de2ccf72b6d766fded8d44">00032</a> <span class="preprocessor">#define CAN_COB_RPDO1           (4 &lt;&lt; 7)        </span>
<a name="l00033"></a><a class="code" href="group__cobs.html#ga942b09187f9bedeab6737b244b415322">00033</a> <span class="preprocessor">#define CAN_COB_TPDO2           (5 &lt;&lt; 7)        </span>
<a name="l00034"></a><a class="code" href="group__cobs.html#ga2d3b983d7dbbe135c14a0c8aedc0ec7f">00034</a> <span class="preprocessor">#define CAN_COB_RPDO2           (6 &lt;&lt; 7)        </span>
<a name="l00035"></a><a class="code" href="group__cobs.html#gad76e0419c11e5c94c6af7190f4a02d8c">00035</a> <span class="preprocessor">#define CAN_COB_TPDO3           (7 &lt;&lt; 7)        </span>
<a name="l00036"></a><a class="code" href="group__cobs.html#ga7f5b095f91fbc088536cd655ae48921d">00036</a> <span class="preprocessor">#define CAN_COB_RPDO3           (8 &lt;&lt; 7)        </span>
<a name="l00037"></a><a class="code" href="group__cobs.html#ga9acc78c7da2263a388d66fd302f93754">00037</a> <span class="preprocessor">#define CAN_COB_TPDO4           (9 &lt;&lt; 7)        </span>
<a name="l00038"></a><a class="code" href="group__cobs.html#gaf8d749925bb9261db867aab08131d912">00038</a> <span class="preprocessor">#define CAN_COB_RPDO4           (10 &lt;&lt; 7)       </span>
<a name="l00039"></a><a class="code" href="group__cobs.html#ga7b7137afef284d09d1798f9d2d65566b">00039</a> <span class="preprocessor">#define CAN_COB_TSDO            (11 &lt;&lt; 7)       </span>
<a name="l00040"></a><a class="code" href="group__cobs.html#gaa5bc920091e8cb42454a54cad23fb331">00040</a> <span class="preprocessor">#define CAN_COB_RSDO            (12 &lt;&lt; 7)       </span>
<a name="l00041"></a><a class="code" href="group__cobs.html#gab82e13909a1ad1b0e89f7df9e4fefa69">00041</a> <span class="preprocessor">#define CAN_COB_ERROR_CONTROL   (14 &lt;&lt; 7)       </span>
<a name="l00048"></a><a class="code" href="group__nmt.html#ga54a7aab0edab952d6db2b1672dfcc6c0">00048</a> <span class="preprocessor">#define CAN_NMT_START           0x01    </span>
<a name="l00049"></a><a class="code" href="group__nmt.html#gab43455ea1d1a63e374728bbd607bd61d">00049</a> <span class="preprocessor">#define CAN_NMT_STOP            0x02    </span>
<a name="l00050"></a><a class="code" href="group__nmt.html#ga86b3b4c7dea73ed16d9afcd54fdb45e4">00050</a> <span class="preprocessor">#define CAN_NMT_PREOP           0x80    </span>
<a name="l00051"></a><a class="code" href="group__nmt.html#ga2bbae8bbd244861113596642c414b8f7">00051</a> <span class="preprocessor">#define CAN_NMT_RESET           0x81    </span>
<a name="l00052"></a><a class="code" href="group__nmt.html#gadb0a54fb1ac13cd7f194be9ce4d6be28">00052</a> <span class="preprocessor">#define CAN_NMT_RSCOMM          0x82    </span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="comment">/* @} */</span>
<a name="l00054"></a>00054 
<a name="l00059"></a><a class="code" href="mbed__can_8h.html#a52ff3ecfc2500c39903bb92e7697d42a">00059</a> <span class="preprocessor">#define CAN_BUFSIZE             256</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
<a name="l00061"></a>00061 <span class="comment">/* Function defintions. */</span>
<a name="l00062"></a>00062 <span class="keywordtype">void</span> setCANBaudrate(uint8_t, uint32_t);
<a name="l00063"></a>00063 <span class="keywordtype">void</span> initCAN(uint8_t);
<a name="l00064"></a>00064 uint8_t CANopenRecv(uint8_t, uint8_t*, uint32_t*, uint8_t*);
<a name="l00065"></a>00065 uint8_t CANopenSend(uint8_t, uint8_t, uint32_t, uint8_t, uint8_t*);
<a name="l00066"></a>00066 <span class="keywordtype">void</span> flushCANRxBuffer(uint8_t);
<a name="l00067"></a>00067 <span class="keywordtype">void</span> flushCANTxBuffer(uint8_t);
<a name="l00068"></a>00068 <span class="keywordtype">void</span> CAN_IRQHandler(<span class="keywordtype">void</span>);
<a name="l00069"></a>00069 
<a name="l00070"></a>00070 <span class="preprocessor">#endif</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span>
</pre></div></div>
</div>


<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 18 2012 14:53:28 for mbed-lib by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
